package be.novelfaces.component.numpaddecsep;

import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponentBase;

@ResourceDependencies({
		@ResourceDependency(library = "novelfaces", name = "js/jquery-nf.min.js"),
		@ResourceDependency(library = "novelfaces", name = "js/jquery.numpadDecSeparator-1.1.1-min.js"),
		@ResourceDependency(library = "novelfaces", name = "js/novelfaces.js") })
public class NumpadDecimalSeparator extends UIComponentBase {

	public static final String COMPONENT_TYPE = "be.novelfaces.component.NumpadDecimalSeparator";
	public static final String COMPONENT_FAMILY = "be.novelfaces.component";
	private static final String DEFAULT_RENDERER = "be.novelfaces.component.NumpadDecimalSeparatorRenderer";

	protected enum PropertyKeys {
		separator, predefinedVariable;
	}

	public NumpadDecimalSeparator() {
		setRendererType(DEFAULT_RENDERER);
	}

	@Override
	public String getFamily() {
		return COMPONENT_FAMILY;
	}
	
	
	public String getSeparator() {
		return (java.lang.String) getStateHelper().eval(PropertyKeys.separator, null);
	}
	
	public void setSeparator(String _separator) {
		getStateHelper().put(PropertyKeys.separator, _separator);
	}
	
	public String getPredefinedVariable() {
		return (java.lang.String) getStateHelper().eval(PropertyKeys.predefinedVariable, null);
	}
	
	public void setPredefinedVariable(String _predefinedVariable) {
		getStateHelper().put(PropertyKeys.predefinedVariable, _predefinedVariable);
	}

}
